//
//  HYOUSearchViewCell.m
//  BestGift
//
//  Created by 温晓宇 on 16/1/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "HYOUSearchViewCell.h"

@interface HYOUSearchViewCell ()

@property(nonatomic, retain) UILabel *label;

@end

@implementation HYOUSearchViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self create];
    }
    return self;
}
-(void)create{
    self.label = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH / 4, 5, WIDTH / 2, 30)];
//    self.label.backgroundColor = [UIColor redColor];
    self.label.layer.cornerRadius = 15;
    self.label.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.label.layer.borderWidth = 3;
    self.label.layer.masksToBounds = YES;
    self.label.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.label];
}
-(void)setName:(NSString *)name{
    if (_name != name) {
        [_name release];
        _name = [name retain];
    }
    self.label.text = self.name;
}
@end
